package com.ulife.me.endpoints.bound.controllers;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ulife.me.base.entities.bouns.Bouns;
import com.ulife.me.common.base.controller.JsonResult;
import com.ulife.me.common.base.controller.Results;
import com.ulife.me.common.services.bouns.BounsService;

@RestController
@RequestMapping("bouns")
public class BounsController {

	@Reference(version = "0.0.1-SNAPHOST") BounsService bounsService;
	
	@RequestMapping("")
	@ResponseBody
	public JsonResult list() throws Exception{
		List<Bouns> bouns = bounsService.list();
		JsonResult result = Results.success();
		result.putData("bouns", bouns);
		return result;
	}
	
}
